#include<iostream>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<cstdio>
#include<algorithm>
#define debug(a) cout<<#a<<"="<<a<<endl;
using namespace std;
const int maxn=1e4+1000;
typedef long long LL;
inline LL read(){LL x=0,f=1;char ch=getchar();	while (!isdigit(ch)){if (ch=='-') f=-1;ch=getchar();}while (isdigit(ch)){x=x*10+ch-48;ch=getchar();}
return x*f;}
char str[maxn];
LL dp[maxn][4];
vector<string>v;
string get(LL l,LL r){
    string s="";
    for(LL i=l;i<=r;i++) s+=str[i];
    return s;
}
int main(void)
{
  cin.tie(0);std::ios::sync_with_stdio(false);
  cin>>(str+1);
  LL len=strlen(str+1);
  if(len<=6){
    cout<<"0"<<"\n";
  }
  else{
    LL ans=0;
    if(len>=7){
        string s=get(len-1,len);
        v.push_back(s);
        dp[len-1][2]=1;
    }
    if(len>=8){
        string s=get(len-2,len);
        v.push_back(s);
        dp[len-2][3]=1;
    }
    if(len-3>5){
        for(LL i=len-3;i<=len-3;i++){
            string s1=get(i,i+1);
            string s2=get(i+2,i+3);
            if(s1!=s2){
                v.push_back(s1);
                dp[i][2]=1;
            }
        }
    }
    for(LL i=len-4;i>5;i--){
            if(dp[i+2][3]){
               dp[i][2]=1;
               string s1=get(i,i+1);
               v.push_back(s1);
            }
            else if(dp[i+2][2]){
                string s1=get(i,i+1);
                string s2=get(i+2,i+3);
                if(s1!=s2){
                    v.push_back(s1);
                    dp[i][2]=1;
                }
            }
            if(dp[i+3][2]){
                string s1=get(i,i+2);
                v.push_back(s1);
                dp[i][3]=1;
            }
            else if(dp[i+3][3]){
                string s1=get(i,i+2);
                string s2=get(i+3,i+5);
                if(s1!=s2){
                    v.push_back(s1);
                    dp[i][3]=1;
                }
            }
    }
    sort(v.begin(),v.end());
    v.erase(unique(v.begin(),v.end()),v.end());
    cout<<v.size()<<"\n";
    for(auto i:v){
        cout<<i<<"\n";
    }
  }
return 0;
}
